package com.wr.controllers;

import com.wr.pojos.UserImageEntity;
import com.wr.services.UserImageService;
import com.wr.utils.PageInfo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/test")
public class TestLayuiController {

    @Resource
    private UserImageService userImageService;

    @RequestMapping("/toImage")
    public String toImage(Model model, PageInfo pageInfo){

        List<UserImageEntity> userImageEntities = userImageService.selectImageList(pageInfo);
        model.addAttribute("userImageEntities",userImageEntities);
        return "layui/image";
    }

}
